import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  // mode: 'history',
  routes: [
    { path: "/", redirect: "/login" },
    { path: "/login", component: () => import("@/components/wms/login") },
    { path: "/datas", component: () => import("@/components/wms/datas") },
    {
      path: "/wms/",
      component: () => import("@/components/wms"),
      children: [
        { path: "/", component: () => import("@/components/wms/0-home") },
        {
          path: "home",
          component: () => import("@/components/wms/0-home")
        },
        {
          path: "show",
          component: () => import("@/components/wms/0-home/show")
        },
        {
          path: "analysis/:id",
          component: () => import("@/components/wms/1-analysis/")
        },

        {
          path: "activity",
          component: () => import("@/components/wms/2-activity/list")
        },
        {
          path: "activity/:id",
          component: () => import("@/components/wms/2-activity/list/detail")
        },

        {
          path: "ranking",
          component: () => import("@/components/wms/3-ranking/")
        },
        {
          path: "user",
          component: () => import("@/components/wms/4-administrat/user")
        },
        {
          path: "match",
          component: () => import("@/components/wms/4-administrat/match")
        },
        {
          path: "device",
          component: () => import("@/components/wms/4-administrat/device")
        },
        {
          path: "role",
          component: () => import("@/components/wms/4-administrat/role")
        },
        {
          path: "sport",
          component: () => import("@/components/wms/4-administrat/sport")
        },
        {
          path: "scene",
          component: () => import("@/components/wms/4-administrat/scene")
        },
        {
          path: "spread",
          component: () => import("@/components/wms/4-administrat/spread")
        },
      ]
    }
  ]
});
